<div class="wrap">
	<ul class="order_list">
		<li>
			<label id="changeNum">产品数量</label>
			<input type="text" id="productNum">
		</li>
		<li>
			<label id="changeSpec">产品规格</label>
			<select id="productSpec">
				<option value="0">210*290</option>
				<option value="1">210*145</option>
				<option value="2">260*190</option>
				<option value="3">130*190</option>
			</select>
		</li>
		<li>
			<label id="changeDemand">工艺要求</label>
			<select id="productDemand">
				<option value="0">无</option>
				<option value="1">覆膜</option>
				<option value="2">UV上光</option>
				<option value="3">胶装</option>
				<option value="4">骑马钉</option>
				<option value="5">压凸</option>
				<option value="6">压型</option>
				<option value="7">裱糊</option>
				<option value="8">烫金</option>
				<option value="9">烫银</option>
			</select>
		</li>
		<li>
			<a href="javascript:void(0)" id="orderSubmit">查询</a>
		</li>
		<li>
			<label>当前价格为：</label>
			<input type="text" id="total">
		</li>
	</ul>	
</div>
<script>
	var firstNum;
	$("#orderSubmit").on("click",function(){
		//数量
		if($("#productNum").val()>50){
			firstNum = "N1";
		}else{
			firstNum = "N0";
		}
		//规格
		var secondNum = "S"+$("#productSpec option:selected").val(); 
		//工艺
		var thirdNum = "G"+$("#productDemand option:selected").val();
		var str = firstNum+secondNum+thirdNum;
		//请求单价
		$.ajax({
			type:"post",
			url:"http://39.108.164.20/device/SysUser/SelPrice",
			data:{
				model:str
			},
			dataType:"json",
			success:function(res){
				var price = res.result.data.price;
				var num = $("#productNum").val();
				var total = price*num;
				$("#total").val(total+"元");
			}
		});
	})
</script>
